﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FubiManger.Controls;

namespace FubiManger.UI
{
    partial class EditForm : Smobiler.Core.Controls.MobileForm
    {
        public EditForm() : base()
        {
            //This call is required by the SmobilerForm.
            InitializeComponent();
        }
        /// <summary>
        /// 商户ID
        /// </summary>
        public string merchantid { get; set; }
        private void panclose_Press(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnexit_Press(object sender, EventArgs e)
        {
            exitcontrol con = new exitcontrol();
            this.Form.ShowDialog(con);
                
        }

        private void EditForm_Load(object sender, EventArgs e)
        {
            //Version newest = new Version("1.0.2");//实际项目中可将最新版本号存在数据库中
            //if (this.Client.Version < newest)
            //{
            //    lblvison.Text = "1.0.3 New";

            //}
            //else
                lblvison.Text = this.Client.Version.ToString();
        }
        /// <summary>
        /// 协议
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void panagreement_Press(object sender, EventArgs e)
        {
            this.Form.Show(new AgreementForm(), true);
        }
        /// <summary>
        /// 联系我们
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void panus_Press(object sender, EventArgs e)
        {
            DialogOptions options = new DialogOptions(LayoutJustifyAlign.FlexEnd);
            options.Padding = Padding.Empty;
            aboutuscontrol con = new aboutuscontrol();
            con.merchantid = merchantid;//商户ID
            this.Form.ShowDialog(con, options);
        }
    }
}